Successive approximate capacitance measurement circuit

ABSTRACT

A capacitance measurement circuit includes a current source, a switch, and a comparator. The current source is coupled to drive a current through a circuit node. The switch is coupled to the circuit node to switch the current into a device under test (“DUT”) capacitor. The comparator includes first and second input ports. The comparator is coupled to compare a first voltage received on the first input port against a reference voltage received on the second input port. The first voltage is related to the current driven through the circuit node, a frequency at which the switch is switched, and a capacitance of the DUT capacitor.

TECHNICAL FIELD

This disclosure relates generally to electronic circuits, and inparticular but not exclusively, relates to capacitance measurementcircuits.

BACKGROUND INFORMATION

Capacitance sensors are used to implement a variety of useful functionsincluding touch sensors (e.g., touch pad, touch dial, touch wheel,etc.), determining the presence of an object, accelerometers, and otherfunctions. FIG. 1 illustrates a conventional capacitance sensor 100including three switches 105 with control terminals φ0, φ1, and φ2, anintegrating capacitor 110 having a capacitance C_(INT), and an analog todigital (“ADC”) converter 115. Capacitance sensor 100 may be used tosense changes in capacitance on a device under test (“DUT”) capacitor120 having a changing capacitance C_(DUT).

During operation, capacitance sensor 100 operates as follows to sensecapacitance changes on DUT capacitor 120. First, integrating capacitor110 is discharged to a ground potential by asserting control terminal φ0to open circuit switch SW0 and by asserting control terminal φ1 to closecircuit switch SW1. Once discharged to ground, integrating capacitor 110is disconnected from ground by asserting φ1 to open switch SW1. Then,DUT capacitor 120 is charged to the supply voltage VS by asserting φ0 toopen circuit switch SW0 and asserting φ2 to close circuit switch SW2.Once DUT capacitor 120 charges to the supply voltage VS, the charge onDUT capacitor 120 is transferred onto integrating capacitor 110 anddistributed between the two capacitors. Charge transfer occurs byasserting φ1 and φ2 to open circuit switches SW1 and SW2, respectively,and asserting φ0 to close circuit switch SW0.

The above stages of charging DUT capacitor 120 and transferring thecharge onto integrating capacitor 110 are repeated a fixed number timescausing the voltages of nodes N1 and N2 to ramp with time as illustratedin line graphs 130 and 135, respectively. After a fixed number ofconsecutive charging stages and charge transferring stages, ADCconverter 115 samples the final voltage on node N2. The capacitanceC_(DUT) is determined based on the output of ADC converter 115 and isproportional to the voltage at node N2 after the final charge transferstage.

Capacitance sensor 100 functions properly if C_(INT) is considerablylarger than C_(DUT) (e.g., 1000× larger) so as to average out noise onthe supply voltage VS. However, using a large C_(INT) value requires alarge number of charge transfer cycles to achieve a good capacitancemeasurement of C_(DUT). Therefore, capacitance sensor 100 may have arelatively slow measurement time. Furthermore, capacitance sensor 100uses ADC 115 which is a relatively complex and expensive component.

BRIEF DESCRIPTION OF THE DRAWINGS

Non-limiting and non-exhaustive embodiments of the invention aredescribed with reference to the following figures, wherein likereference numerals refer to like parts throughout the various viewsunless otherwise specified.

FIG. 1 is a block diagram illustrating a conventional capacitancesensor.

FIG. 2 is a circuit diagram illustrating a capacitance measurementcircuit, in accordance with an embodiment of the invention.

FIG. 3 is a flow chart illustrating a process of operation of acapacitance measurement circuit, in accordance with an embodiment of theinvention.

FIG. 4 is a circuit diagram illustrating a capacitance measurementcircuit, in accordance with an alternative embodiment of the invention.

FIG. 5 is a circuit diagram illustrating a capacitance measurementcircuit, in accordance with an alternative embodiment of the invention.

FIG. 6 illustrates a demonstrative integrated circuit for implementingan embodiment of the invention.

DETAILED DESCRIPTION

Embodiments of an apparatus and method of operation for a capacitancemeasurement circuit are described herein. In the following descriptionnumerous specific details are set forth to provide a thoroughunderstanding of the embodiments. One skilled in the relevant art willrecognize, however, that the techniques described herein can bepracticed without one or more of the specific details, or with othermethods, components, materials, etc. In other instances, well-knownstructures, materials, or operations are not shown or described indetail to avoid obscuring certain aspects.

Reference throughout this specification to “one embodiment” or “anembodiment” means that a particular feature, structure, orcharacteristic described in connection with the embodiment is includedin at least one embodiment of the present invention. Thus, theappearances of the phrases “in one embodiment” or “in an embodiment” invarious places throughout this specification are not necessarily allreferring to the same embodiment. Furthermore, the particular features,structures, or characteristics may be combined in any suitable manner inone or more embodiments.

FIG. 2 is a circuit diagram illustrating a capacitance measurementcircuit 200, in accordance with an embodiment of the invention. Theillustrated embodiment of capacitance measurement circuit 200 includes acurrent source 205, a comparator 210, switches 215, switching logic 220,filter capacitors CF1 and CF2, a resistor RF, and a switchable filtercircuit 225. The illustrated embodiment of filter circuit 225 includes aswitch SW6 and a capacitor CF3. Capacitance measurement circuit 200 maybe used to measure the absolute capacitance C_(DUT) of a DUT capacitor230 or to measure/monitor capacitance changes ΔC_(DUT) of DUT capacitor230.

The components of capacitance measurement circuit 200 are coupled asfollows. Current source 205 is coupled to a node N3 to drive a currentI_(DAC) through node N3. Switching logic 220 is coupled to switches 215to selectively open and close switches 215 at a switching frequency f ina predetermined manner. As switches 215 are opened and closed in thepredetermined manner, DUT capacitor 230 is continuously charged bycurrent source 205 and discharged to a ground potential. Switching logic220 may be logic embodied within hardware circuits or software codeexecuted by a microcontroller or processor.

During operation, current I_(DAC) is switched into DUT capacitor 230 atthe switching frequency f. When current is switched into DUT capacitor230, it has an effective resistance R_(EFF) given by relation 1 below,$\begin{matrix}{R_{EFF} = \frac{2}{f \cdot C_{DUT}}} & \left( {{Relation}\quad 1} \right)\end{matrix}$and therefore according to Ohm's Law, an effective voltage appearsacross DUT capacitor 230 at node N3 given by relation 2 below,$\begin{matrix}{V_{N\quad 3} = {{I_{DAC} \cdot R_{EFF}} = {I_{DAC} \cdot {\frac{2}{f \cdot C_{DUT}}.}}}} & \left( {{Relation}\quad 2} \right)\end{matrix}$

Therefore, changing either the switching frequency f or the chargingcurrent I_(DAC) will cause the voltage at node N3 to changeproportionally according to relation 2. As illustrated in relation 2,there are four variables (V_(N3), I_(DAC), f, and C_(DUT)). If I_(DAC)and f are known or programmable values and V_(N3) can be measured orsuccessively approximated, then the absolute capacitance C_(DUT) orchange in capacitance ΔC_(DUT) of DUT capacitor 230 can be resolved.

In one embodiment, current source 205 is a variable current sourcecapable of generating a selectable charging current I_(DAC) in responseto a select input 207. In one embodiment, select input 207 is a digitalinput coupled to receive a multi-bit select value (e.g., 8-bit value).Accordingly, voltage V_(N3) may be made to vary either by varying themulti-bit select value on select input 207 (i.e., varying the chargingcurrent) or by varying the switching frequency f via switching logic220.

In one embodiment, comparator 210 is a voltage comparator coupled tocompare a voltage V_(N4) at node N4 received on port P1 against areference voltage VR received on port P2. Voltage V_(N4) at node N4 isapproximately equal to voltage V_(N3) at node N3 (e.g., filtered oraveraged version thereof) or otherwise related in a determinable orknown manner to V_(N3). When voltages V_(N4) and VR crossover,comparator 210 toggles its output ‘O’ as an indication of the crossoverevent. The logic state of output ‘O’ is also an indication of whetherV_(N4) is greater than or less than VR. Accordingly by continuouslyadjusting either the switching frequency f and/or the charging currentI_(DAC), a technique of “successive approximation” may be used toiteratively approximate the value of capacitance C_(DUT) by way ofrelation 2. The successive approximation technique sequentially adjuststhe switching frequency f and/or the charging current I_(DAC) aftercomparing V_(N4) to VR to iteratively bring V_(N4) closer to VR, untilV_(N3) in relation 2, can be substituted with the value of VR within anacceptable margin of error (note: V_(N3)≅V_(N4)). With V_(N4) assumed tobe approximately equal to VR, relation 2 can be solved to determineC_(DUT) or ΔC_(DUT).

In the illustrated embodiment, filtering capacitor C_(F1) is coupled tonode N3, filtering capacitor C_(F2) is coupled to node N4, and resistorR_(F) is coupled between nodes N3 and N4. Filtering capacitors C_(F1),and C_(F2) and resistor RF act to filter noise on node N3 and averageits value over time. Filter circuit 225 provides an additional filteringfunction that may be enabled/disabled by appropriate assertion of φ6 toopen or close switch SW6. In one embodiment, resistor R_(F) andfiltering capacitor C_(F2) are variable to provide adjustable filteringhaving adjustable cutoff frequencies. If switching frequency f is usedas the knob to adjust the effective resistance R_(EFF) of DUT capacitor230 and therefore adjust voltage V_(N3) at node N3, then appropriateadjustment of R_(F) and C_(F2) can be used to tune the filtering cutofffrequency accordingly. Example components values for a C_(DUT)≅10 pF areVS≅3.3V, VR=1.30V, C_(F1)≅100 pF, C_(F2)≅10 pF, and R_(F)≅1 MΩ.

Circuit diagram 240 is the circuit equivalent of capacitance measurementcircuit 200 about node N3 when switch SW6 is open circuited. As can beseen, filtering capacitors C_(F1) and C_(F2) and resistor R_(F) form alow pass filter coupled to node N3. R_(EFF) represents the effectiveresistance of DUT capacitor 230 switched at a frequency f Adjustment ofC_(F2) and/or R_(F) will adjust the cutoff frequency of the low passfilter illustrated in circuit diagram 240.

FIG. 3 is a flow chart illustrating a process 300 of operation forcapacitance measurement circuit 200, in accordance with an embodiment ofthe invention. The order in which some or all of the process blocksappear in each process should not be deemed limiting. Rather, one ofordinary skill in the art having the benefit of the present disclosurewill understand that some of the process blocks may be executed in avariety of orders not illustrated.

In a process block 305, power is asserted to capacitance measurementcircuit 200 or capacitance measurement circuit 200 is reset. In aprocess block 310, node N3 is pre-charged. Pre-charging node N3 aids thesuccessive approximation by providing a starting voltage that is closerto VR and therefore capacitance measurement circuit 200 achieves steadystate operation quicker. In one embodiment, node N3 is precharged to thesupply voltage VS.

In a process block 315, DUT capacitor 230 is charged. DUT capacitor 230may be charged by asserting φ5 to open circuit switch SW5 and assertingφ4 to close circuit switch SW4. With switch SW4 closed circuited,current I_(DAC) flows into DUT capacitor 230 from node N3. In oneembodiment, current source 205 charges DUT capacitor 230 up to thesupply voltage VS each charging cycle.

In a process block 320, DUT capacitor 230 is discharged. DUT capacitor230 may be discharged by asserting φ4 to open circuit switch SW4 andasserting φ5 to close circuit switch SW5. Once switch SW5 is closecircuited, charge will flow from DUT capacitor 230 into the return pathvoltage rail (GND) thereby discharging DUT capacitor 230. While switchSW4 is open circuited, charging current I_(DAC) may be recharging filtercapacitor C_(F1). Accordingly, it should be understood that a portion ofthe charging current I_(DAC) used to charge DUT capacitor 230 whenswitch SW4 is close circuited may be sourced from filter capacitorC_(F1).

The switching frequency f and the determination of when to open andclose circuit switches 215 is executed by switching logic 220. In oneembodiment, switching logic 220 selects a 50% duty cycle betweenswitches SW4 and SW5; however, other duty cycles may be used.

In a process block 325, the voltage V_(N4) at node N4 is compared bycomparator 210 to the reference voltage VR. Although FIG. 3 illustratesprocess block 325 as occurring after discharging DUT capacitor 230, itshould be appreciated that process block 325 may occur prior todischarging DUT capacitor 320, occur in parallel with either/both of thedischarging or charging stages, or even occur independent of thecharging and discharging stages.

If the voltage V_(N4) is greater than the reference voltage VR (decisionblock 330), then process 300 continues process block 335. In processblock 335, the knob used to adjust the effective resistance R_(EFF) ofDUT capacitor 230 is adjusted to reduce R_(EFF) and therefore reduceV_(N4). R_(EFF) may be reduced by decreasing charging current I_(DAC)and/or increasing switching frequency f If the voltage V_(N4) is lessthan the reference voltage VR (decision block 330), then process 300continues to a process block 340. In process block 340, the knob used toadjust the effective resistance R_(EFF) of DUT capacitor 230 is adjustedto increase R_(EFF) and therefore increase V_(N4). R_(EFF) may beincreased by increasing charging current I_(DAC) and/or decreasingswitching frequency f.

After adjustment of the circuit knob (e.g., switching frequency orcharging current), process 300 returns to process block 315, if thedesired successive approximation resolution has not yet be achieved(decision block 345). In one embodiment, the desired resolution may beachieved after a fixed number of adjustment cycles (e.g., 8, 16, etc.).In one embodiment, the desired resolution may be achieved when thevoltage difference between VR and V_(N4) is measured by comparator 210to be within a predetermined threshold. After the desired resolution(i.e., amount of acceptable deviation between V_(N4) and VR) has beenachieved, the current values of charging current I_(DAC) and switchingfrequency f are plugged into relation 2 with the value of VR substitutedfor V_(N3), and relation 2 solved to determine C_(DUT) (process block350).

In one embodiment, process 300 may be executed while only adjustingcharging current I_(DAC) as the sole circuit knob for manipulatingR_(EFF) of DUT capacitor 230. In one embodiment, process 300 may beexecuted while only adjusting switching frequency f as the sole circuitknob for manipulating R_(EFF) of DUT capacitor 230. In one embodiment,both charging current I_(DAC) and switching frequency f may be adjustedto provide greater successive approximation resolution. In alternativeembodiments, the value of the reference voltage VR itself may beadjusted while maintaining voltage V_(N4) at a fixed value by fixing thecharging current I_(DAC) and the switching frequency f In thisalternative embodiment, VR would be sequentially adjusted until itapproximately equaled V_(N4). The final value of VR would then besubstituted into relation 2 for V_(N3), with the assumption thatV_(N4)≅V_(N3). Furthermore, all three circuit knobs (VR, f and I_(DAC))may be adjusted in turn to provide even greater flexibility andsuccessive approximation resolution.

As mentioned above, capacitance measurement circuit 200 may also be usedto monitor for a change in capacitance ΔC_(DUT) (e.g., operated as aproximity sensor). Capacitance measurement circuit 200 may beinitialized using process 300 until V_(N4) is substantially equal to VR.Then, a voltage margin may be added to VR. While holding switchingfrequency f and charging current I_(DAC) steady, comparator 210 monitorsthe voltage at node N3. When the capacitance C_(DUT) of DUT capacitor230 changes by a predetermined amount corresponding to the voltagemargin added to the reference voltage VR, output O of comparator 210toggles indicating the event.

FIG. 4 is a circuit diagram illustrating a capacitance measurementcircuit 400, in accordance with an alternative embodiment of theinvention. Capacitance measurement circuit 400 is similar to capacitancemeasurement circuit 200, with the exceptions discussed below.Capacitance measurement circuit 400 may be used to measure the absolutecapacitance C_(DUT) of a DUT capacitor 230 or to measure/monitorcapacitance changes ΔC_(DUT) of DUT capacitor 230 in a similar manner asdiscussed in process 300. The illustrated embodiment of capacitancemeasurement circuit 400 includes current source 205, comparator 210,switches 215 (including switches SW4, SW5, SW7, SW8, and SW9), switchinglogic 220, filter capacitor CF1, and a low pass filter (“LPF”) 405.

LPF 405 and switch SW9 are coupled between port P1 of comparator 210 andcircuit node N3. Filter 405 illustrates that a variety of filteringcircuits may be used to implement the filtering and averaging functionsexecuted by resistor R_(F) and filtering capacitor C_(F2) in FIG. 2. Thefiltering function implemented by LPF 405 may be adjustable or fixed. Inone embodiment, the filtering function may be selectable under controlof a microcontroller or even switching logic 220.

Switches SW7, SW8, and SW9 are included within capacitance measurementcircuit 400 to selectively isolate node N3. Node N3 may be isolated forpre-charging, for coupling and measuring different DUT capacitors 230,for coupling a variety of different filtering capacitors C_(F1), orotherwise. Switch SW8 specifically illustrates how node N3 may bepre-charged to the supply voltage VS by open circuiting switches SW4,SW7, and SW9 while close circuiting switch SW8.

FIG. 5 is a circuit diagram illustrating a capacitance measurementcircuit 500, in accordance with an alternative embodiment of theinvention. FIG. 5 illustrates how the various subcomponents ofcapacitance measurement circuits 200 and 400 may be implemented in acircuit design. As illustrated, multiple switches may be coupled to nodeN3, which are in turn coupled to multiple pins. The multiple pins may beused to couple to a variety of different DUT capacitors 230. Theswitches may be selectively enabled to measure the capacitance of eachDUT capacitor 230. In this manner, capacitance measurement circuit 500may be time shared by a plurality of pins for measuring/monitoring thecapacitance of multiple DUT capacitors 230 each coupled to a differentpin.

FIG. 6 illustrates a demonstrative integrated circuit (“IC”) 600implemented using an embodiment of capacitance measurement circuits 200,300, or 500. IC 600 illustrates a Programmable System on a Chip (PSoC™)microcontroller by Cypress Semiconductor Corporation. The illustratedembodiment of IC 600 includes input/output (“I/O”) ports 602. I/O ports602 may be programmable. I/O ports 602 are coupled to ProgrammableInterconnect and Logic (“PIL”) 604 which acts as an interconnect betweenI/O ports 602 and a digital block array 606. Digital block array 606 maybe configured to implement a variety of digital logic circuits (e.g.,DAC, digital filters, digital control systems, etc.) using configurableuser modules (“UMs”). Digital block array 606 is further coupled to asystem bus 612.

Static Random Access Memory (“SRAM”) 610 and processor 611 are alsocoupled to system bus 612. Processor 611 is coupled to non-volatilestorage (“NVS”) 616 which may be used to store firmware (e.g., controlalgorithms executable by processor 225 to implement process 300). In oneembodiment, processor 611 implements switching logic 220.

An analog block array 618 is coupled to system bus 612. Analog blockarray 618 also may be configured to implement a variety of analogcircuits (e.g., ADC, analog filters, comparators, current sources, etc.)using configurable UMs. Analog block array 618 is also coupled to ananalog I/O unit 624 which is coupled to I/O ports 602.

As illustrated, capacitance measurement circuits 200, 300, or 500 may beincorporated into IC 600 and coupled to analog I/O unit 624 for couplingto an externally coupled DUT capacitor 230 via I/O ports 602. Varioussubcomponents of capacitance measurement circuits 200, 300, or 500 maybe implemented with various UMs of digital clock array 606 or analogblock array 618 or the subcomponents may be stand alone components.

The process described above may constitute machine-executableinstructions embodied within a machine (e.g., computer) accessiblemedium, which when executed by a machine will cause the machine toperform the operations described herein. Additionally, the processes maybe embodied within hardware, such as an application specific integratedcircuit (“ASIC”) or the like. A machine-accessible medium includes anymechanism that provides (i.e., stores and/or transmits) information in aform accessible by a machine (e.g., a computer, network device, personaldigital assistant, manufacturing tool, any device with a set of one ormore processors, etc.). For example, a machine-accessible mediumincludes recordable/non-recordable media (e.g., read only memory (ROM),random access memory (RAM), magnetic disk storage media, optical storagemedia, flash memory devices, etc.), as well as electrical, optical,acoustical or other forms of propagated signals (e.g., carrier waves,infrared signals, digital signals, etc.).

As described above, capacitance measurement circuits 200, 300, or 500may be incorporated into IC 600, as well as, various other integratedcircuits. Descriptions of capacitance measurement circuits 200, 300, or500 may be generated and compiled for incorporation into otherintegrated circuits. For example, behavioral level code describingcapacitance measurement circuits 200, or portions thereof, may begenerated using a hardware descriptive language, such as VHDL orVerilog, and stored to a machine-accessible medium. Furthermore, thebehavioral level code can be compiled into register transfer level(“RTL”) code, a netlist, or even a circuit layout and stored to amachine-accessible medium. The behavioral level code, the RTL code, thenetlist, and the circuit layout all represent various levels ofabstraction to describe capacitance measurement circuits 200, 300, or500.

The above description of illustrated embodiments of the invention,including what is described in the Abstract, is not intended to beexhaustive or to limit the invention to the precise forms disclosed.While specific embodiments of, and examples for, the invention aredescribed herein for illustrative purposes, various modifications arepossible within the scope of the invention, as those skilled in therelevant art will recognize.

These modifications can be made to the invention in light of the abovedetailed description. The terms used in the following claims should notbe construed to limit the invention to the specific embodimentsdisclosed in the specification. Rather, the scope of the invention is tobe determined entirely by the following claims, which are to beconstrued in accordance with established doctrines of claiminterpretation.

1. A capacitance measurement circuit, comprising: a variable currentsource coupled to drive a selectable current through a circuit node; aswitch coupled to the circuit node to switch the selectable current intoa device under test (“DUT”) capacitor; and a comparator including firstand second input ports, the comparator coupled to compare a firstvoltage to be received on the first input port against a referencevoltage to be received on the second input port, wherein the firstvoltage is related to the selectable current driven through the circuitnode, a switching frequency at which the switch is switched, and acapacitance of the DUT capacitor, wherein the switch is coupled betweenthe first input port of the comparator and the DUT capacitor.
 2. Thecapacitance measurement circuit of claim 1, wherein the switch comprisesa first switch, the capacitance measurement circuit further comprising asecond switch coupled to selectively discharge the DUT capacitor whenthe first switch is open circuited.
 3. The capacitance measurementcircuit of claim 2, further comprising switching logic coupled toalternately open circuit and close circuit the first and second switchesat the switching frequency.
 4. The capacitance measurement circuit ofclaim 1, further comprising a first capacitor coupled between thecircuit node and a voltage rail.
 5. The capacitance measurement circuitof claim 4, further comprising: a second capacitor coupled between thefirst port of the comparator and the voltage rail; and a resistorcoupled between the circuit node and the first port of the comparator.6. (canceled)
 7. The capacitance measurement circuit of claim 5, whereinthe resistor comprises a variable resistance resistor and wherein thesecond capacitor comprises a variable capacitance capacitor.
 8. Thecapacitance measurement circuit of claim 2, further comprising a lowpass filter coupled between the circuit node and the first port of thecomparator.
 9. The capacitance measurement circuit of claim 8, furthercomprising: a first capacitor coupled to a voltage rail; a third switchcoupled between the first capacitor and the circuit node; a fourthswitch coupled between the low pass filter and the circuit node; and afifth switch coupled between the circuit node and a second voltage railfor precharging the circuit node. 10.-17. (canceled)
 18. Amachine-accessible medium having contained thereon a description of anintegrated circuit, the integrated circuit comprising: a current sourcecoupled to drive a current through a circuit node; a first switchcoupled between the circuit node and a device under test (“DUT”)capacitor to switch the current into the DUT capacitor; a second switchcoupled to selectively discharge the DUT capacitor when the first switchis open circuited; and a comparator including first and second inputports, the comparator electrically coupled to the circuit nodeindependent of whether the second switch is open circuited, thecomparator to compare a first voltage to be received on the first inputport against a reference voltage to be received on the second inputport, wherein the first voltage is related to the current driven throughthe circuit node, a switching frequency at which the switch is switched,and a capacitance of the DUT capacitor.
 19. The machine-accessiblemedium of claim 18, wherein the integrated circuit further comprisesswitching logic coupled to alternately open circuit and close circuitthe first and second switches at variable frequencies.
 20. Themachine-accessible medium of claim 18, wherein current source comprisesa variable current source.
 21. The apparatus of claim 1, wherein thesecond input port of the comparator is coupled to receive the referencevoltage independent of an output of the comparator.
 22. The apparatus ofclaim 1, further comprising a precharge switch coupled to the circuitnode to selectively precharge the circuit node.
 23. The capacitancemeasurement circuit of claim 2, wherein the first switch is coupledbetween the circuit node and the DUT capacitor and wherein a terminal ofthe second switch is coupled between the first switch and the DUTcapacitor.
 24. An apparatus, comprising: a source of current coupled todrive current through a circuit node; a first switch coupled to switchthe current into a device under test (“DUT”) capacitor; a second switchcoupled to selectively discharge the DUT capacitor; and a comparatorincluding first and second ports, the first port of the comparatorcoupled to the circuit node independent of whether the second switch isopen circuited to compare a first voltage to be received on the firstport against a second voltage to be received on the second port, whereina change in the first voltage is related to a change in a capacitance ofthe DUT capacitor, wherein the first switch is coupled between the firstinput port of the comparator and the DUT capacitor.
 25. The apparatus ofclaim 24, wherein the first voltage is related to the current driventhrough the circuit node, a switching frequency at which the firstswitch is switched, and the capacitance of the DUT capacitor.
 26. Theapparatus of claim 24, wherein the source of current comprises avariable current source.
 27. The apparatus of claim 24 furthercomprising a third switch coupled to selectively precharge the circuitnode.
 28. The apparatus of claim 24, wherein the second port of thecomparator is coupled to a variable voltage source and wherein thesecond voltage is selectable according to the variable voltage source.